package com.itheima.variable;

import java.util.Scanner;

/**
 * @author yuanying
 * @date 2025/7/22 -  15:23
 */
public class ArrayDemo1 {
    public static void main(String[] args) {
        int[] arr={33,11,45,68,98,67,4,3,56,7};
        for(int i=0;i<arr.length;i++){
            System.out.println(arr[i]);
        }

        int[] arr1={23,5,7,89,0,6,3,6};
        int sum1=0;
        for(int j=0;j<arr1.length;j++){
            sum1+=arr1[j];
    }
        System.out.println("求和结果"+sum1);
        double[] scores=new double[6];
        Scanner sc=new Scanner(System.in);
        for(int i=0;i<scores.length;i++){
            System.out.println("请您输入第"+(i+1)+"个评委打分：");
            double score=sc.nextDouble();
            scores[i]=score;
        }

        int sum=0;
        for(int j=0;j<scores.length;j++){
            sum+=scores[j];
}
        System.out.println("求和结果"+sum);
        System.out.println("平均结果"+sum/scores.length);
}
}